import java.util.Scanner;

public class Main {

    //美丽的 2024 位运算
    //求 2024 的二进制中有几个 1
    //按位与 —— & ：都为 1 才为 1

    public static int countBinaryOnes(int num) {
        int count = 0;
        while (num > 0) {
            count += num & 1;
            num >>>= 1; // 无符号右移（保持高位补0）
        }
        return count;
    }

    public static void main1(String[] args) {
        int number = 2024;
        int onesCount = countBinaryOnes(number);

        System.out.println(onesCount);
    }


    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] num = new int[15];
        int ans = 0;
        change(num,2,2024);
        for (int i = 0; i < num.length; i++) {
            if(num[i] == 1){
                ans += 1;
            }
        }
        System.out.println(ans);

    }

    private static int[] change(int[] num, int n, int x) {
        int len = 0;
        while(x > 0){
            num[len++] = x % n;
            x /= n;
        }
        return num;
    }


    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //int num = scan.nextInt();
        int num = 2024;
        int ans = 0;
        while(num > 0){
            int tmp = num % 2;
            num /= 2;
            if(tmp == 1){
                ans += 1;
            }
        }
        System.out.println(ans);

    }


}
